package com.lc.user.express.httpserver;

import com.lc.user.express.model.AddrModel;
import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONArray;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/4/5.充值页面
 */
@HttpInlet(Net.GET_CHARGEINFO)
public class GetChargeInfo extends ZJDBAsyGet<GetChargeInfo.Info> {
    public String userid;

    public GetChargeInfo(String userid,AsyCallBack listener) {
        super(listener);
        this.userid = userid;
    }

    @Override
    protected Info parser(JSONObject object) {
        if (object.optInt("message") == 1) {
            Info info = new Info();
            info.type = object.optInt("type");
            info.banktype = object.optString("banktype");
            info.number = object.optString("number");
            return info;
        }
        return null;
    }

    public static class Info {
        public int type;
        public String banktype;
        public String number;
    }
}
